<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="com.evaluatedetail.model.*"%>
<%
EvaluateDetailVO evaluatedetailVO = (EvaluateDetailVO) request.getAttribute("evaluatedetailVO"); //EmpServlet.java (Concroller), 存入req的empVO物件 (包括幫忙取出的empVO, 也包括輸入資料錯誤時的empVO物件)
%>
<html>
<head>
<title>評價明細修改 - update_Evaluatedetail_input.jsp</title></head>
<link rel="stylesheet" type="text/css" href="js/calendar.css">
<script language="JavaScript" src="js/calendarcode.js"></script>

<div id="popupcalendar" class="text"></div>

<body bgcolor='white'>

<table border='1' cellpadding='5' cellspacing='0' width='400'>
	<tr bgcolor='#CCCCFF' align='center' valign='middle' height='20'>
		<td>
		<h3>評價明細修改 - update_Evaluatedetail_input.jsp</h3>
		<a href="<%=request.getContextPath()%>/select_evaluate_page.jsp"><img src="images/back1.gif" width="100" height="32" border="0">回首頁</a></td>
	</tr>
</table>

<h3>資料修改:</h3>
<%-- 錯誤表列 --%>
<c:if test="${not empty errorMsgs}">
	<font color='red'>請修正以下錯誤:
	<ul>
		<c:forEach var="message" items="${errorMsgs}">
			<li>${message}</li>
		</c:forEach>
	</ul>
	</font>
</c:if>

<FORM METHOD="post" ACTION="evaluatedetail.do" name="form1" ;>
<table border="0">
	<tr>
		<td>評價值:</td>
		<td><input type="TEXT" name="value" size="45" value="<%=evaluatedetailVO.getValue()%>" /></td>
	</tr>														
	<tr>
		<td>駕駛編號:<font color=red><b>*</b></font></td>
		<td><input type="TEXT" name="driver_path_id" size="45"	value="<%=evaluatedetailVO.getDriver_path_id()%>" /></td>
	</tr>	
	<tr>
		<td>乘客編號:</td>
		<td><input type="TEXT" name="rider_path_id" size="45"	value="<%=evaluatedetailVO.getRider_path_id()%>" /></td>
	</tr>
	<tr>
		<td>訂單編號:</td>
		<td><input type="TEXT" name="order_id" size="45"	value="<%=evaluatedetailVO.getOrder_id()%>" /></td>
	</tr>	

	<jsp:useBean id="evaluateSvc" scope="page" class="com.evaluate.model.EvaluateService" />
	<tr>
		<td>評價編號:<font color=red><b>*</b></font></td>
		<td><select size="1" name="evaluate_id">
			<c:forEach var="evaluateVO" items="${evaluateSvc.all}">
				<option value="${evaluateVO.evaluate_id}" ${(evaluatedetailVO.evaluate_id==evaluateVO.evaluate_id)?'selected':'' } >${evaluateVO.item}
			</c:forEach>      
	</tr>

</table>
<br>
<input type="hidden" name="action" value="update">
<input type="hidden" name="driver_path_id" value="<%=evaluatedetailVO.getDriver_path_id()%>">
<input type="hidden" name="requestURL" value="<%=request.getParameter("requestURL")%>"><!--接收原送出修改的來源網頁路徑後,再送給Controller準備轉交之用-->
<input type="hidden" name="whichPage" value="<%=request.getParameter("whichPage")%>">  <!--只用於:istAllEmp.jsp-->
<input type="submit" value="送出修改"></FORM>

<br>送出修改的來源網頁路徑:<br><b>
   <font color=blue>request.getParameter("requestURL"):</font> <%= request.getParameter("requestURL")%><br>
   <font color=blue>request.getParameter("whichPage"):</font> <%= request.getParameter("whichPage")%> (此範例目前只用於:istAllEmp.jsp))</b>
</body>
</html>
